let a = [3, 22, 111]
const max = a.reduce((pre, next) => {
  return pre > next ? pre : next
}, 0)
console.log(max);